package AliDiepPR.ANN;

import java.util.Random;

public class Perceptron {
	float output;
	public float Output(float val, boolean set) {
		if (set) output = val;
		return output;
	}
	
	float threshold;
	public float Threshold(float val, boolean set) {
		if (set) threshold = val;
		return threshold;
	}
	
	public Perceptron() {
		output = 1;
		threshold = 0;
	}
	
	public void Randomize(Random rand) {
		threshold = (float)rand.nextDouble();
	}
}
